package com.qidian.mes.sys.config;

import com.qidian.mes.sys.interceptors.OptionLogInterceptor;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;

/**
 * @Author 戴着假发的程序员
 * @Company 起点编程
 * @Description
 * @Time 2024/4/7 12:06
 */
@Configuration
public class WebConfig implements WebMvcConfigurer {
    @Autowired
    private OptionLogInterceptor optionLogInterceptor;
    @Override
    public void addInterceptors(InterceptorRegistry registry) {
        registry.addInterceptor(optionLogInterceptor).addPathPatterns("/**/update*","/**/save*","/**/add*","/**/delete*");
    }
}
